#pragma once

#define SURFACE_NUMBER 3

#define MY_ERROR_CHECK if(FAILED(hr))return 0

// Surfaces

#define SURFACE_IMAGE1 0
#define SURFACE_IMAGE2 1
#define SURFACE_IMAGE3 2

typedef struct _GlobalInfo
{
	int Update;
	int NextInsertImage;
	SIZE DisplaySize;
	IDirectDraw7 *pIDD;
	BitmapFont SimpleBlackFont;
	LastSurface LastSurf;
	int ActiveItem;
	int DownItem;
	void *Matrix;
	int Size;
	int *QMatrix;
	int CamAvailable;
	int UsingCamera;
	RECT CameraBlt;
	PictureControl *MyControls;
	LPDIRECTDRAWSURFACE7 surfaces[SURFACE_NUMBER];
	LPDIRECTDRAWSURFACE7 MainImage;
	LPDIRECTDRAWSURFACE7 TImage;
	LPDIRECTDRAWSURFACE7 DamagTImage;
	LPDIRECTDRAWSURFACE7 RestoredImage;
	DWORD nLenaBuild;
	DWORD nLenaTimer;
} GlobalInfo;

extern GlobalInfo GV;